<!DOCTYPE html>
<html>

<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8" name="viewport" content="initial-scale=1.0, user-scalable=no">
    <title>test</title>
    <link rel="shortcut icon" href="static/image/logo01.ico" />
    <script type="text/javascript" src="static/vue/vue.js"></script>
    <link rel="stylesheet" href="static/elementUI/index.css">
    <script type="text/javascript" src="static/elementUI/index.js"></script>
    <script type="text/javascript" src="static/vue/vue-router.js"></script>
</head>

<body style="height: 100%;">
    <div id="app">
        <h1>Hello App!</h1>
        <p>
            <!-- 使用 router-link 组件来导航. -->
            <!-- 通过传入 `to` 属性指定链接. -->
            <!-- <router-link> 默认会被渲染成一个 `<a>` 标签 -->
            <router-link to="/foo">Go to Foo</router-link>
            <router-link to="/bar">Go to Bar</router-link>
        </p>
        <!-- 路由出口 -->
        <!-- 路由匹配到的组件将渲染在这里 -->
        <router-view></router-view>
    </div>
    <script>
        const Foo = { template: '<div>foo</div>' }
        const Bar = { template: '<div>bar</div>' }
        new Vue({
            el: '#app',
            router: new VueRouter({
                routes: [
                    { path: '/foo', component: Foo },
                    { path: '/bar', component: Bar }
                ]
            })
        });


    </script>
</body>

</html>